import service from '@/utils/request.js'

const adminApi = {
    list(adminQuery){
        return service.get('/admin/list',{params:adminQuery})
    },
    delete(id){
        return service.delete(`/admin/deleteById/${id}`)
    },
    deleteAll(ids) {
        return service.delete(`/admin/deleteAll/${ids}`)
    },
    add(admin){
        return service.post(`/admin/add`,admin)
    },
    update(admin){
        return service.put(`/admin/update`,admin)
    },
    getById(id){
        return service.get(`/admin/selectById/${id}`)
    },
    login(admin){
        return service.post(`/admin/login`,admin)
    },
    adminIfo(){
        return service.get(`/admin/adminInfo`)
    },
    updateStatus(admin){
        return service.put('admin/updateStatus',admin)
    },
    resetPassword(passwords){
        return service.put('admin/resetPassword',passwords)
    }
}
export default adminApi